load("@fbcode_macros//build_defs/lib:rust_oss.bzl", "rust_oss")
load("@fbsource//tools/build_defs:rust_binary.bzl", "rust_binary")

oncall("scm_server_infra")

rust_binary(
    name = "mononoke_modern_sync_job",
    srcs = glob([
        "src/**/*.rs",
    ]),
    test_deps = ["//eden/mononoke/mononoke_macros:mononoke_macros"],
    deps = ([
        "fbsource//third-party/rust:anyhow",
        "fbsource//third-party/rust:async-trait",
        "fbsource//third-party/rust:bytes",
        "fbsource//third-party/rust:bytesize",
        "fbsource//third-party/rust:clap",
        "fbsource//third-party/rust:futures",
        "fbsource//third-party/rust:tokio",
        "fbsource//third-party/rust:tracing",
        "fbsource//third-party/rust:url",
        "fbsource//third-party/rust:uuid",
        "//common/rust/shed/borrowed:borrowed",
        "//common/rust/shed/cloned:cloned",
        "//common/rust/shed/facet:facet",
        "//common/rust/shed/fbinit:fbinit",
        "//common/rust/shed/justknobs_stub:justknobs",
        "//common/rust/shed/sorted_vector_map:sorted_vector_map",
        "//common/rust/shed/stats:stats",
        "//eden/mononoke/repo_attributes/repo_blobstore:repo_blobstore",
        "//eden/mononoke/blobstore:blobstore",
        "//eden/mononoke/repo_attributes/bonsai_hg_mapping:bonsai_hg_mapping",
        "//eden/mononoke/repo_attributes/bookmarks:bookmarks",
        "//eden/mononoke/cmdlib/mononoke_app:mononoke_app",
        "//eden/mononoke/cmdlib/sharding:executor_lib",
        "//eden/mononoke/cmdlib/sharding_ext:sharding_ext",
        "//eden/mononoke/common/assembly_line:assembly_line",
        "//eden/mononoke/common/scuba_ext:scuba_ext",
        "//eden/mononoke/derived_data:changeset_info",
        "//eden/mononoke/derived_data/mercurial_derivation:mercurial_derivation",
        "//eden/mononoke/edenapi_service:edenapi_service",
        "//eden/mononoke/repo_attributes/filestore:filestore",
        "//eden/mononoke/manifest:manifest",
        "//eden/mononoke/mercurial:mercurial_types",
        "//eden/mononoke/metaconfig:metaconfig_types",
        "//eden/mononoke/mononoke_macros:mononoke_macros",
        "//eden/mononoke/mononoke_types:mononoke_types",
        "//eden/mononoke/repo_attributes/mutable_counters:mutable_counters",
        "//eden/mononoke/repo_attributes/commit_graph/commit_graph:commit_graph",
        "//eden/mononoke/repo_attributes/repo_derived_data:repo_derived_data",
        "//eden/mononoke/repo_attributes/repo_identity:repo_identity",
        "//eden/mononoke/server/context:context",
        "//eden/mononoke/common/metadata:metadata",
        "//eden/scm/lib/clientinfo:clientinfo",
        "//eden/scm/lib/edenapi:edenapi",
        "//eden/scm/lib/edenapi/types:edenapi_types",
        "//eden/scm/lib/http-client:http-client",
        "//eden/scm/lib/minibytes:minibytes",
    ] + ([] if rust_oss.is_oss_build() else [
        "//fb303/thrift:fb303_core-rust-thriftclients",
    ])),
)
